package com.dmlll.dao;

import com.dmlll.VO.AccountVO;
import com.dmlll.VO.ParticularsVO;
import com.dmlll.VO.RegisterMessageVO;
import com.dmlll.pojo.PopulaceUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PopulaceUserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(PopulaceUser record);

    int insertSelective(PopulaceUser record);

    PopulaceUser selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(PopulaceUser record);

    int updateByPrimaryKey(PopulaceUser record);

    //注册信息
    int insertUser(PopulaceUser populaceUser);

    //登录
    PopulaceUser login(@Param("userAccount")String userAccount);

    //账户管理
    List<AccountVO>selectAll(@Param("userPhone") String userPhone,@Param("grade") Integer grade);

    //注册信息审核
    List<RegisterMessageVO>selectRegister(@Param("userPhone") String userPhone,@Param("accountGrade")Integer accountGrade);

    //查看详情
    ParticularsVO selectExamine(@Param("id")Integer id);

    //修改审核状态(通过)
    int updateAudit(@Param("idList") Integer[] idList);

    //修改审核状态(不通过)
    int updateAuditNO(@Param("idList") Integer[] idList,@Param("notPassCause")String notPassCause);

    //查询出所有账号（避免注册重复）
    List<PopulaceUser> selectUserAccount();


}